<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>{$title}</title>
    <link rel="stylesheet" href="./public/css/bootstrap.css">
    <link rel="stylesheet" href="./public/reset.css">
</head>
<body>
    <div class="container">
        <h1>{$title}</h1>
        <hr/>
        <a href="./index.php" class="glyphicon glyphicon-home"></a>
        <a class="glyphicon glyphicon-user btn-lg" href="./index.php?c=user&a=index"></a>
        <a class="btn btn-primary" href="./index.php?c=user&a=add">添加用户</a>
        {block name="main"}
        <table class="table table-hover mt20">
            <tr>
                <th>ID</th>
                <th>NAME</th>
                <th>SEX</th>
                <th>AGE</th>
                <th>PROVINCE</th>
                <th class="col-md-1">操作</th>
            </tr>
            {foreach $list as $v}
            <tr>
                <td>{$v.id}</td>
                <td>{$v.name}</td>
                <td>
                    {if $v.sex == '0'}女
                    {elseif $v.sex == '1'}男
                    {else}保密
                    {/if}
                </td>
                <td>{$v.age}</td>
                <td>{$v.province}</td>
                <td>
                    <a href="./index.php?c=user&a=edit&id={$v.id}" class="glyphicon glyphicon-wrench"></a>&nbsp&nbsp
                    <a href="./index.php?c=user&a=del&id={$v.id}" class="glyphicon glyphicon-trash"></a>
                </td>
            </tr>
            {/foreach}
        </table>
    </div><!-- end container -->
    {/block}

    <script src="./public/js/jquery.min.js"></script>
    <script src="./public/js/bootstrap.min.js"></script>
</body>
</html>
